#include <iostream>
#include <string>
#include <vector>
#include <algorithm>


using namespace std;

struct stu
{
public:
    string name;
    string skill;
    int id;

public:
    stu() { }

    stu(string name, string skill ,int id) :name(name) , skill(skill) ,id(id) {}

};

bool Func(stu val)
{
    if (val.id == 3)
    {
        return 1;
    }
    return 0;
    
}

int main(int argc, char const *argv[])
{
    vector<stu> s1;
    s1.push_back(stu("唐三","复活吧",1));
    s1.push_back(stu("萧炎","佛怒火莲",2));
    s1.push_back(stu("林动","大荒囚天指",3));
    s1.push_back(stu("牧尘","灵阵",4));
    s1.push_back(stu("陈平安","妈",5));

    auto it =find_if(s1.begin() ,s1.end() , Func);

    cout << it->name << endl;

    return 0;
}
